package com.server.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;


/**
 * The persistent class for the ItemCategory database table.
 * 
 */
@Entity
@XmlRootElement
@Table(schema="mhp")
public class ItemCategory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int categoryId;

	private String categoryName;
	
	@OneToMany(mappedBy="itemCategory",cascade={CascadeType.PERSIST,CascadeType.MERGE})
	private List<ItemType> types;

	
	public ItemCategory() {
	}


	public int getCategoryId() {
		return categoryId;
	}


	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}


	public List<ItemType> getTypes() {
		return types;
	}


	public void setTypes(List<ItemType> types) {
		this.types = types;
	}


	public String getCategoryName() {
		return this.categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

}